package homework;


public class Int {
	int value;

	public Int(int value) {
		super();
		this.value = value;
	}

	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}
	public boolean isPrime() {
		for(int i=2;i<this.value;i++) {
			if(value%i==0) {
				return false;
			}
		}
		return true;
	}
	public boolean isPrime(int m) {
		for(int i=2;i<m;i++) {
			if(m%i==0) {
				return false;
			}
		}
		return true;
	}
	public boolean isEven() {
		if(this.value%2==0) 
			return true;
		return false;
	}
	public boolean isEven(int m) {
		if(m%2==0) 
			return true;
		return false;
	}


	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Int other = (Int) obj;
		if (value != other.value)
			return false;
		return true;
	}
	
}
